export default {
  namespaced: true,
  state () {
    return {
      list: [
        {id: 1, text: '抓鱼', done: true},
        {id: 2, text: '煮鱼', done: false},
        {id: 3, text: '吃鱼', done: true}
      ]
    }
  },
  getters: {
    doneList (state) {
      return state.list.filter(todo => todo.done)
    },
    unDoneList (state) {
      return state.list.filter(todo => !todo.done)
    }
  }
}
